<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="zh_CN">
<meta charset="utf-8">
<head>
    <title>权限管理</title>
    <jsp:include page="../../include/head.jsp"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a data-toggle="tab" href="#tab-1" aria-expanded="true"> 菜单/按钮权限</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-2" aria-expanded="false">其他权限</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div id="tab-1" class="tab-pane active">
                            <div class="panel-body">
                                <div id="exampleToolbar" role="group" class="t-bar">
                                    <shiro:hasPermission name="admin:permission:add">
                                        <button type="button"
                                                class="btn btn-primary" title="在根节点下添加菜单" onclick="add('0')">
                                            <i class="fa fa-plus" aria-hidden="true"></i>添加
                                        </button>
                                    </shiro:hasPermission>
                                    <shiro:hasPermission name="admin:permission:batchRemove">
                                        <button type="button"
                                                class="btn btn-danger" onclick="batchRemove()">
                                            <i class="fa fa-trash" aria-hidden="true"></i>删除
                                        </button>
                                    </shiro:hasPermission>
                                </div>
                                <table id="exampleTable" data-mobile-responsive="true">
                                </table>
                            </div>
                        </div>
                        <div id="tab-2" class="tab-pane">
                            <div class="panel-body">
                                <div id="exampleToolbar2" role="group">
                                    <shiro:hasPermission name="admin:permission:add">
                                        <button type="button"
                                                class="btn btn-primary" title="在根节点下添加菜单" onclick="add('0')">
                                            <i class="fa fa-plus" aria-hidden="true"></i>添加
                                        </button>
                                    </shiro:hasPermission>
                                    <shiro:hasPermission name="admin:permission:batchRemove">
                                        <button type="button"
                                                class="btn btn-danger" onclick="batchRemove()">
                                            <i class="fa fa-trash" aria-hidden="true"></i>删除
                                        </button>
                                    </shiro:hasPermission>
                                </div>
                                <table id="exampleTable2" data-mobile-responsive="true">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div>
        <script type="text/javascript">
            var s_add_h = 'hidden';
            var s_edit_h = 'hidden';
            var s_remove_h = 'hidden';
            <shiro:hasPermission name="admin:permission:add">
            s_add_h = '';
            </shiro:hasPermission>
            <shiro:hasPermission name="admin:permission:edit">
            s_edit_h = '';
            </shiro:hasPermission>
            <shiro:hasPermission name="admin:permission:remove">
            s_remove_h = '';
            </shiro:hasPermission>
        </script>
    </div>
</div>
<jsp:include page="../../include/footer.jsp"/>
<script src="app/resources/js/appjs/admin/permission/permission.js"></script>
</body>

</html>